﻿<Window x:Class="WPFReverseAndSortArrays.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:src="clr-namespace:WPFReverseAndSortArrays"
    Title="Reverse and Sort Arrays" Height="469" Width="850"
    ResizeMode="NoResize" Loaded="Window_Loaded">
    <Window.Resources>
        <src:Status x:Key="origStatus" status="Crystal Consulting Init"/>
        <src:Status x:Key="sortStatus" status="Crystal Consulting Sort"/>
        <src:StatusCollection x:Key="collectStatus"/>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <StackPanel>
            <TextBox Text="{Binding Source={StaticResource origStatus}, Path=status}" Height="30" Margin="5,5,5,5" Name="textbox1"></TextBox>
            <TextBox Name="testbox2" Height="30" Margin="5,5,5,5"></TextBox>
            <ListBox Width="200" Height="170" Margin="5,5,5,5" Name="listBox1" />
        </StackPanel>
        <Button Grid.Column="1" Margin="3,3,3,3" Name="button1" Click="button1_Click">Sort =></Button>
        <StackPanel Grid.Column="2">
            <StackPanel.DataContext>
                <Binding Source="{StaticResource sortStatus}"/>
            </StackPanel.DataContext>
            <TextBox Name="textbox3" Height="30" Margin="5,5,5,5" Text="{Binding Path=status, UpdateSourceTrigger=PropertyChanged}"></TextBox>
            <TextBox Name="textbox4" Height="30" Margin="5,5,5,5" Text="{Binding Path=status, UpdateSourceTrigger=PropertyChanged}"></TextBox>
            <ListBox Width="200" Height="170" Margin="5,5,5,5" Name="listBox2" />
        </StackPanel>
        <StackPanel Grid.Column="4">
            <ComboBox Name="combobox1" Height="30" Margin="5,5,5,5">
                <ComboBoxItem>Combo1</ComboBoxItem>
                <ComboBoxItem>Combo2</ComboBoxItem>
                <ComboBoxItem>Combo3</ComboBoxItem>
            </ComboBox>
            <TextBox Height="30" Margin="5,5,5,5" Text="{Binding ElementName=combobox1, Path=SelectedItem.Content}"/>
            <ListBox Width="200" Height="170" Margin="5,5,5,5" Name="listBox3" />        
        </StackPanel>
        <Button Grid.Column="3" Margin="3,3,3,3" Name="button2" Click="button2_Click">Reverse =></Button>
    </Grid>
</Window>
